from ronglian_sms_sdk import SmsSDK
from celery_tasks.main import app
accId = '8aaf070881ad8ad401821a3746221b5e'
accToken = 'c3331c51b9f4988a2c49e43752cb0737'
appId = '8aaf070881ad8ad401821a3747091b65'


@app.task
def send_message(mobile, data):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'  # 容联云分配的一个测试短信验证码模版
    datas = (data,)
    resp = sdk.sendMessage(tid, mobile, datas)
    return resp
